package com.yztstudy.clients;

import com.yztstudy.clients.impl.CartHystrixImpl;
import com.yztstudy.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 购物车的远程调用接口
 */

@FeignClient(value = "cart-service", fallback = CartHystrixImpl.class)
public interface CartFeignClient {


    /**
     * TODO 检查购物车中是否有要删除的商品
     * @param productId 商品的Id
     * @return
     */
    @PostMapping("/cart/check")
    public R check(@RequestBody Integer productId);
}
